package org.leon.servlet;

import org.leon.HttpServlet;
import org.leon.Request;
import org.leon.Response;
import org.leon.util.HttpProtocolUtil;

public class Demo2Servlet extends HttpServlet {

    @Override
    public void doGet(Request request, Response response) throws Exception {
        String data = "This is <h2>Demo2</h2> servlet running";
        String headerStr = HttpProtocolUtil.httpHeader200(data.getBytes().length) + data;
        response.outputString(headerStr);
    }

    @Override
    public void doPost(Request request, Response response) throws Exception {

    }
}
